####################################################
####          Replication Code for              ####
####     Spatial Interdependence                ####
####     and Instrumental Variable Models       ####
####################################################
####                                            ####
####                9/ 06/2018                  ####
####  this file runs R-file to create W's       ####
####      the Applications                      ####
####                                            ####
###                                             ####
####################################################

library(haven)
library(countrycode) ### important that this is version 0.19 otherwise we will have different number of observations and slightly different results
library(cshapes)
library(spdep)
library(plyr)
library(dplyr)


#### set working directory
###setwd()
sink("log_replication_Wcreation.txt")

### record computing environment
devtools::session_info()
sessionInfo()

source("Ramsay_W.R", echo = T)
source("Ashraf_Galor_W.R", echo = T)

sink()
